include('shared.lua') -- At this point the contents of shared.lua are ran on the client only.

function NPCShopMenu()

	-- Small derma panel just for the example.
local ccm_shop_item_airboat
local ccm_shop_item_jeep
local DLabel1
local ccm_shop_preview
local ccm_shop_dpanel
local ccm_shop_frame

DLabel1 = vgui.Create('DLabel')
DLabel1:SetPos(555, 321)
DLabel1:SetText('Items for sale')
DLabel1:SizeToContents()
DLabel1:SetTextColor(Color(173, 255, 47, 255))

ccm_shop_frame = vgui.Create('DFrame')
ccm_shop_frame:SetSize(651, 194)
ccm_shop_frame:Center()
ccm_shop_frame:SetTitle('Community Creative Mod: AI Shop')
ccm_shop_frame:SetSizable(true)
ccm_shop_frame:SetDeleteOnClose(false)
ccm_shop_frame:SetBackgroundBlur(true)
ccm_shop_frame:MakePopup()

ccm_shop_dpanel = vgui.Create('DPanel')
ccm_shop_dpanel:SetParent(ccm_shop_frame)
ccm_shop_dpanel:SetSize(639, 161)
ccm_shop_dpanel:SetPos(4, 26)

ccm_shop_preview = vgui.Create('SpawnIcon')
ccm_shop_preview:SetParent(ccm_shop_dpanel)
ccm_shop_preview:SetPos(5, 5)
ccm_shop_preview:SetModel('models/humans/group01/female_01.mdl')

ccm_shop_item_jeep = vgui.Create('SpawnIcon')
ccm_shop_item_jeep:SetParent(ccm_shop_dpanel)
ccm_shop_item_jeep:SetPos(238, 25)
ccm_shop_item_jeep:SetModel('models/buggy.mdl')

ccm_shop_item_airboat = vgui.Create('SpawnIcon')
ccm_shop_item_airboat:SetParent(ccm_shop_dpanel)
ccm_shop_item_airboat:SetPos(311, 25)
ccm_shop_item_airboat:SetModel('models/airboat.mdl')


	-- We can also do anything else the client can do, like using the chat!
	chat.AddText(Color(255,255,128), "Vehicle Merchant: ",Color(255,255,255), "What would you like to buy?" )
	
end

usermessage.Hook("ShopNPCUsed", NPCShopMenu) --Hook to messages from the server so we know when to display the menu.